package com.wechat.conf;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 *
 * @description:
 * @author daxuexiu
 * @create_time：2018年4月19日
 * @version V1.0.0
 *
 */
@Configuration
@EnableSwagger2
@ComponentScan(basePackages ={"com.wechat.controller"})
public class MySwaggerConfig {

    @Bean
    public Docket customDocket(){
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(apiInfo())
                ;

    }


    private ApiInfo apiInfo() {
        return new ApiInfoBuilder().title("微信接口")
                .contact("yueylg@126.com")
                .description("<p>微信接口</p>")
                .build();
    }
}
